package com.starleague.battletech.hexagonal.jpa.appengine;

import com.starleague.battletech.hexagonal.BattletechHexTerrainType;
import com.starleague.battletech.hexagonal.IBattletechHexGridFactory;
import com.starleague.hexagonal.HexException;
import com.starleague.hexagonal.IHexCoordinate;

public class BattletechHexGridGaeFactory
        implements IBattletechHexGridFactory<BattletechHexGridGae, BattletechHexGae>
{
    @Override
    public BattletechHexGridGae createHexGrid(int minGridX,
                                              int minGridY,
                                              int numHexesX,
                                              int numHexesY) throws HexException
    {
        return new BattletechHexGridGae(minGridX, minGridY, numHexesX, numHexesY);
    }

    @Override
    public BattletechHexGae createHex(BattletechHexGridGae hexGrid,
                                      IHexCoordinate hexCoordinate,
                                      int elevation) throws HexException
    {
        return new BattletechHexGae(hexGrid, hexCoordinate, elevation);
    }

    @Override
    public BattletechHexTerrainGae createHexTerrain(BattletechHexGae hex,
                                                    BattletechHexTerrainType hexTerrainType,
                                                    int level) throws HexException
    {
        return new BattletechHexTerrainGae(hex, hexTerrainType, level);
    }
}
